1 <?php
2     include_once
'header.php';
3 ?>
4
5 <html>
6     <head>
7             <title>user</title>
8                     <link rel=
"stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
9
10                     <!-- Optional theme -->
11                     <link rel=
"stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
12
13                     <!-- Latest compiled and minified JavaScript -->
14                     <script src=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
15                     <meta name=
"viewport" content="width=device-width, initial-scale=1">
16     </head>
17
18     <style>
19             table,th,td
20             {
21                 border: 2px color:transparent;
22                 font-family: monospace;
23                 font-size:
150%;
24                 padding:
0.25cm;
25             }
26             body{
27                     background-image: url(
"images/user.jpg");
28                     background-repeat: no-repeat;
29                     background-size:cover;
30                     color: white;
31                 }
32
33             button
34             {
35                 display: block;
36                 margin:
0 auto;
37                 width:
10%;
38                 height: 40px;
39                 border: none;
40                 background-color: #
222;
41                 font-family: arial;
42                 font-size: 16px;
43                 color: #fff;
44                 cursor: pointer;
45             }
46             a{
47                 color: white;
48             }
49     </style>
50
51     <head>
52             <h1 align=
"middle" style="font-size: 300%; color:white;"><b>USER PROFILE</b></h1>
53     </head>
54
55     <body style=
"background-color: powderblue; font-family: monospace; margin: 0; padding: 0;">
56         <h1> </h1>
57
58     <?php
59
60         $dbServername =
"localhost";
61         $dbUsername =
"root";
62         $dbPassword =
"password";
63         $dbName =
"test";
64         
65         $conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);
66         
67
68         $sql=
"select fname,lname,age,phone,email,uname,count from users where id='".$_SESSION['u_id']."' " ;
69         mysqli_query($conn, $sql) or die(
'Error user profile');
70         $result=mysqli_query($conn, $sql);
71         
while($row=mysqli_fetch_assoc($result))
72                 {
73                     echo
'<br><br><table style="margin-left: auto; margin-right:auto; ">
74                                 
75                                 <tr>
76                                     <td><u> <b>First Name</b></u></td>
77                                     <td>
'.$row['fname'].'</td>
78                                 </tr>
79                                 <tr>
80                                     <td><u><b> Last Name</b></u></td>
81                                     <td>
'.$row['lname'].'</td>
82                                 </tr>
83                                 <tr>
84                                     <td><u><b> Age </b></u></td>
85                                     <td>
'.$row['age'].'</td>
86                                 </tr>
87                                 <tr>
88                                     <td><u><b> Phone</b> </u></td>
89                                     <td>
'.$row['phone'].'</td>
90                                 </tr>
91                                 <tr>
92                                     <td><u><b>Email</b> </u></td>
93                                     <td>
'.$row['email'].'</td>
94                                 </tr>
95                                 <tr>
96                                     <td><u><b>User Name </b></u></td>
97                                     <td>
'.$row['uname'].'</td>
98                                 </tr>
99                                 <tr>
100                                     <td><u><b>Total bookings</b> </b></u></td>
101                                     <td><a href=
"userbooking.php">'.$row['count'].'</a></td>
102                                 </tr>
103                         </table><br><br>
';
104                 }
105         echo
'<center><a style="font-size: 250%; font-family: monospace;" href="details.php">Change Details <span class="glyphicon glyphicon-pencil"></span> </a></center>';
106         
107
108     ?>
109     </body>
110 </html>
111 <?php
112     include_once
'footer.php';
113 ?>


Gõ tìm kiếm nhanh...